<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>A岛匿名版本地数据浏览</title>
        <meta name="viewport" content="width=device-width, user-scalable=no" />
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <meta name="msapplication-tap-highlight" content="no" />
        <meta name="format-detection" content="telephone=no">
        <style type="text/css">
            html{margin:0;padding:0;height:100%;font-size:62.5%}body{font-size:1.6rem;background-color:#efeff4;margin:0;padding:0;height:100%;display:block;overflow:hidden;font-family:"...","Microsoft YaHei","WenQuanYi Micro Hei",sans-serif}h1{margin:0 0 1rem 0}h1{font-size:2.5rem;font-weight:normal}p{font-size:1.9rem;font-weight:normal;line-height:2.5rem;font-size:inherit}blockquote,em{font-style:normal}a,img,button,blockquote{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent}.button::-moz-focus-inner,[role="button"]::-moz-focus-inner,button::-moz-focus-inner{border:0;outline:0}button,[role="button"]{font-family:sans-serif;font-style:noraml;width:100%;height:4rem;margin:0 0 1rem;padding:0 1.2rem;-moz-box-sizing:border-box;display:inline-block;vertical-align:middle;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;background-color:#d8d8d8;border:0;cursor:pointer;font-weight:normal;font-size:1.6rem;line-height:4rem;color:#333;text-align:center;text-decoration:none;outline:0}select:-moz-focusring{color:transparent;text-shadow:0 0 0 #333}section[role="region"]>header{z-index:0;height:auto}section[role="region"]>header:first-child{position:relative;display:block;padding:0;height:5rem;border:0;color:#fff;background-color:#009688;box-shadow:0 3px 6px rgba(0,0,0,0.16),0px 3px 6px rgba(0,0,0,0.23)}section[role="region"]>header:first-child h1{font-size:1.8rem;line-height:5rem;white-space:nowrap;text-overflow:ellipsis;display:block;overflow:hidden;margin:0;color:#fff;height:100%;font-weight:300}section[role="region"]>header:first-child menu{height:100%;float:right;padding:0;margin:0}section[role="region"]>header:first-child button,section[role="region"]>header:first-child [role="button"]{box-sizing:border-box;position:relative;display:block;overflow:hidden;float:left;width:10rem;height:5rem;border:0;background:0;margin:0;font-weight:400;font-size:1.5rem;line-height:5rem;border-radius:0;text-decoration:none;text-align:center;text-shadow:none}section[role="region"]>header:first-child button:focus{outline:0}section[role="region"]>header:first-child button,section[role="region"]>header:first-child [role="button"]{color:rgba(0,0,0,0.6)}section[role="region"]>header:first-child button:first-child,section[role="region"]>header:first-child [role="button"]:first-child{width:auto}section[role="region"]>header:first-child button:active,section[role="region"]>header:first-child [role="button"]:active,section[role="region"]>header:first-child button:hover,section[role="region"]>header:first-child [role="button"]:hover{background-color:rgba(0,0,0,0.07)}section[role="region"]>header:first-child button:focus,section[role="region"]>header:first-child [role="button"]:focus{background-color:transparent}section[role="region"]{width:100%;transition:all .50s ease 0s;-webkit-transition:all .50s ease 0s;position:relative}section[data-position="current"]{-webkit-transform:translatex(0);transform:translatex(0)}section[data-position="right"]{-webkit-transform:translate(100%,0);transform:translate(100%,0)}section[role="region"]{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;background-color:#fff;border:0;overflow:hidden}section[role="region"]>header.fixed:first-child{position:absolute;width:100%}[data-page]{margin-bottom:15px}.content{padding-bottom:0;-webkit-transition-property:transform;transition-property:transform;-webkit-transform-origin:0 0;transform-origin:0 0}.scrollable{overflow-x:hidden;overflow-y:auto;height:100%;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative}.scrollable.header{height:95%;height:calc(100% - 5rem);top:5rem}.pagination{position:relative;cursor:pointer}.pagination:hover{color:#3668d1}.pagination .arrow{display:inline-block;overflow:hidden;vertical-align:middle;margin-left:1.5rem;border-bottom:1px solid #000;width:5px;height:5px;border-left:1px solid #000;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.pagination,.msg{margin:0;height:4rem;line-height:4rem;text-align:center;background-color:#fff}.msg{margin-bottom:3rem}.comment{padding:10px;margin:10px;border-bottom:0;position:relative;background-color:#fff;word-break:break-all;letter-spacing:.6px;-moz-box-shadow:1px 1px 5px #a07888;-webkit-box-shadow:1px 1px 5px #a07888;box-shadow:1px 1px 5px #a07888}.oplist-section .comment{cursor:pointer}.thread-section .comment{margin:0;background:0;border-bottom:1px solid #e0d1d1;box-shadow:none;overflow-x:hidden;overflow-y:auto}.oplist-section .comment:active{background-color:#0ac;color:#fff}.comment-image{margin-top:10px}.comment img{max-width:100%;max-height:100%}.comment-header{position:relative;margin:0;color:#808080}.po{color:#000;font-weight:bold}.uid:not(:empty){margin-right:10px}.oplist-section .comment:not(.comment-list) .long-long-ago{color:#812fcd}.comment-header .rid,.quote-header .rid{position:absolute;top:0;right:0;height:100%;line-height:100%}.comment[data-state="downloaded"] .rid:before{content:"已下载"}.comment[data-state="draft"] .rid:before{content:"草稿"}.comment-info{padding:0 .5rem;margin:.5rem 0}.comment-info p,.sage{margin:0;color:red}.comment-content{padding:.6rem 0;line-height:1.5}blockquote{font-size:1.2rem;margin:0;font-style:normal;cursor:pointer;display:inline-block;width:100%}blockquote p{margin-top:0}blockquote blockquote{border-left:none;color:#233}.quote-area{color:#233;background-color:#e0f2f1;position:relative;margin:5px 5px 5px 20px;padding:0 5px 5px 10px;border-left:6px solid rgba(0,83,159,0.65);max-height:100px;text-overflow:ellipsis;overflow:hidden;font-style:normal}.quote-area.quote-show.quote-area,.quote-area.quote-show .comment-content{max-height:100%}.quote-area .comment-content{margin:0;padding:0;max-height:3em;overflow:hidden}.quote-area .btn-show-image{width:auto;border:0;color:#3d3da5;background:0;font-size:1.2rem;padding:0;margin:0;line-height:30px;height:30px}.quote-area p{margin-top:0;margin-bottom:0}.quote-header{position:relative}.quote-header .rid{text-decoration:underline;color:#606554}.quote-no{color:#789922}section[role="region"]>header:first-child .tab input{width:0;height:0;visibility:hidden;position:absolute;left:0;top:0}section[role="region"]>header:first-child .tab input:checked+label{background-color:rgba(0,0,0,0.1);color:#fff}.thumb-size,.thumb-size img{max-width:100%;max-height:100%}.full-size,.full-size img{max-width:none;max-height:none}.hidden{display:none}.desktop-mode .oplist-section{width:40%}.desktop-mode .thread-section{width:60%;right:0;left:auto}.desktop-mode .thread-section[data-position="right"]{-webkit-transform:translatex(0);transform:translatex(0)}.desktop-mode #btn-thread-back{display:none}@media only screen and (max-width:360px){.comment-header{font-size:1.4rem}}
        </style>
    </head>
    <body>
        <section id="oplist-section" class="oplist-section" role="region" data-mode="favor" data-position="current">
            <header class="fixed">
                <menu type="toolbar" class="tab">
                  <input type="radio" name="rb" id="rb-favor" checked>
                  <label role="button" for="rb-favor" id="btn-favor" >收藏</label>
                  <input type="radio" name="rb" id="rb-comment">
                  <label role="button" for="rb-comment" id="btn-comment">评论</label>
                </menu>
                <h1>
                    <a href="http://www.adnmb.com" target="_blank" role="button">AC匿名版</a>
                </h1>
            </header>
            <div class="scrollable header">
              <div data-type="list" class="content"></div>
            </div>
        </section>
        <section id="thread-section" class="thread-section" role="region" data-mode="local-thread" data-position="right">
            <header class="fixed">
                <button id="btn-thread-back" type="button">返回</button>
                <menu type="toolbar">
                    <button id="btn-originalThread" href="#">查看原串</button>
                </menu>
                <h1></h1>
            </header>
            <div class="scrollable header">
              <div data-type="list" class="content"></div>
            </div>
        </section>
    </body>
    <script type="text/javascript">
        var D=function(a){return document.getElementById(a)},Caches={},H={hacfun:{site:"hacfun",thread:"http://www.adnmb.com/t",cdn:"http://www.adnmb.com/Public/Upload"},beitai:{site:"beitai",thread:"https://tnmb.org/t",cdn:"https://tnmb.org/Public/Upload"}};window.addEventListener("DOMContentLoaded",function(){D("oplist-section").addEventListener("click",opListClickEvent,false);D("thread-section").addEventListener("click",threadClickEvent,false);window.addEventListener("resize",updateLayout);updateLayout();loadOPList("favor")});function updateLayout(){var b=window.innerWidth;var a=document.body.classList;if(b<1024){a.remove("desktop-mode");a.add("mobile-mode")}else{a.remove("mobile-mode");a.add("desktop-mode")}}function opListClickEvent(l){var k=D("oplist-section"),i=k.querySelector(".content"),h=l.target,m=h.tagName.toLowerCase(),f=h.classList,b=h.id;if(f.contains("pagination")){var n=k.getAttribute("data-total-page");var j=prompt("输入页数（共"+n+"页）","");if(!j){return}if(!j||isNaN(j)||parseInt(j,10)>n||parseInt(j,10)<=0){j=n}var g=k.getAttribute("data-mode");navigateToPage(j,g);document.querySelector("#oplist-section .scrollable").scrollTop=0}else{if(m=="img"||m=="image-placeholder"){h.classList.toggle("full-size")}else{if(f.contains("comment")||(h=findParent(h,".comment"))&&h){var d=h.getAttribute("data-tid"),e=h.getAttribute("data-reply-page"),a=h.getAttribute("data-site")||"hacfun",c=h.getAttribute("data-fname");var g=k.getAttribute("data-mode");D("thread-section").setAttribute("data-site",a);if(g=="favor"){D("thread-section").setAttribute("data-thread-id",d);empty(document.querySelector("#thread-section .content"));loadThread(d,1)}else{window.open(H[a].thread+"/"+d+(e?"?page="+e:""),"_blank")}}else{if(b=="btn-favor"){k.setAttribute("data-mode","favor");loadOPList("favor")}else{if(b=="btn-comment"){k.setAttribute("data-mode","comment");loadOPList("comment")}}}}}}function threadClickEvent(l){var k=D("thread-section"),i=k.querySelector(".content"),h=l.target,n=h.tagName.toLowerCase(),g=h.classList,c=h.id;if(c=="btn-thread-back"){D("thread-section").setAttribute("data-position","right");setTimeout(function(){freeImageMemory(i.querySelectorAll("img"));i.innerHTML=""},500)}else{if(c=="btn-originalThread"){var d=k.getAttribute("data-thread-id"),b=k.getAttribute("data-site")||"hacfun";window.open(H[b].thread+"/"+d,"_blank")}else{if(g.contains("pagination")){var m=k.getAttribute("data-total-page");var j=prompt("输入页数（共"+m+"页）","");if(!j){return}if(isNaN(j)||parseInt(j,10)>m||parseInt(j,10)<=0){j=m}navigateToPage(j,"local-thread");document.querySelector("#thread-section .scrollable").scrollTop=0}else{if(n=="img"){var f=findParent(h,".quote-area");if(f){f.classList.toggle("quote-show")}else{if(findParent(h,".comment")){h.classList.toggle("full-size")}}}else{if(g.contains("btn-show-image")){var f=findParent(h,".quote-area");f&&f.classList.add("quote-show");var a=h.getAttribute("local-src")||h.getAttribute("thumb-src");var e=document.createElement("img");e.src=a;h.parentNode.replaceChild(e,h)}else{if(g.contains("quote-area")||(h=findParent(h,".quote-area"))&&h){h.classList.toggle("quote-show")}}}}}}}function loadOPList(h,f,e){f=parseInt(f,10)||1;var g=D("oplist-section");var d=g.querySelector(".content");var c=h+"/"+h+".index";var b=function(p){document.removeEventListener("dataLoaded",b);document.removeEventListener("dataError",a);p=p.detail.data;if(h=="favor"){p.sort(function(u,i){return i.created-u.created})}else{if(h=="comment"){p.sort(function(u,i){u.created=u.created||u.createdAt;i.created=i.created||i.createdAt;return i.created-u.created})}}e=d.querySelectorAll(".comment").length>600?0:e;var r=40;var o=Math.ceil(p.length/r);o=o<=0?1:o;var j=(f-1)*r;var m=f*r;var s=[];for(var n=j;n<m;n++){if(!p[n]){break}s.push(p[n])}g.setAttribute("data-total-page",o);var l={data:s,currentPage:f,totalPage:o};var t=new Page(h,l);insert(e,d,t,d.firstChild);if(f==1||e==0){document.querySelector("#oplist-section .scrollable").scrollTop=0}var q=f+1;var k=q>o?showMsg(d,"已是最后一页"):showMsg(d,"点击加载Page "+q,function(i){loadOPList(h,q,2)});d.appendChild(k)};var a=function(){document.removeEventListener("dataLoaded",b);document.removeEventListener("dataError",a);d.appendChild(showMsg(d,"没有此页数据"))};document.addEventListener("dataLoaded",b);document.addEventListener("dataError",a);loadContent(c)}function loadThread(c,f,j){f=parseInt(f,10)||1;var i=D("thread-section"),e=i.querySelector(".content"),h=i.querySelector("h1"),b=i.getAttribute("data-site")||"hacfun",k=b=="hacfun"?"t":b.charAt(0),a="favor/threads/"+k+c+"/data/"+f+".data",d=19;i.setAttribute("data-position","current");h.textContent="...";var l=function(r){document.removeEventListener("dataLoaded",l);document.removeEventListener("dataError",g);r=r.detail.data;if(!r){alert("没有此页数据");return}r=backwardCompatible(r);j=e.querySelectorAll(".comment").length>600?0:j;var q=Math.ceil(r.replyCount/d);q=q||1;i.setAttribute("data-total-page",q);addToCache(c,f,r);h.textContent="No."+c+"("+r.replyCount+")";var s={data:r,currentPage:f,totalPage:q};var m=new Page("local-thread",s);if(f>=2){m.removeChild(m.querySelector("article"))}var o=new Quote(m.querySelectorAll("blockquote"),c);o.renderAll();insert(j,e,m,e.firstChild);if(f==1||j==0){document.querySelector("#thread-section .scrollable").scrollTop=0}var n=f+1;var p=n>q?showMsg(e,"已是最后一页"):showMsg(e,"点击加载Page "+n,function(t){loadThread(c,n,2)});e.appendChild(p)};var g=function(){document.removeEventListener("dataLoaded",l);document.removeEventListener("dataError",g);e.appendChild(showMsg(e,"没有此页数据"))};document.addEventListener("dataLoaded",l);document.addEventListener("dataError",g);loadContent(a)}function loadContent(c,d,b){var a=document.createElement("script");a.type="text/javascript";a.className="data-js";a.src=c;a.onload=function(){this.onload=null;setTimeout(function(){a.parentNode.removeChild(a)},400)};a.onerror=function(){this.onerror=null;a.parentNode.removeChild(a);dispatch(document,"dataError")};document.getElementsByTagName("head")[0].appendChild(a)}function Comment(g,j,m,d){var i=g.userid||g.uid;var e=(m&&m==i)?true:false;var a=function(o){var p=/((&gt;&gt;\s?No\.)|(>>\s?No\.)|(>>)|(&gt;&gt;))\d+\s*(<br \/>)?(\r)?(\n)?/ig;o=o.replace(p,function(r){var q=r.match(/\d+/);q=q&&q.length>0&&q[0];if(q){return"<blockquote data-thread-id='"+q+"' data-po-uid=\""+escape(m)+"\"><span class='quote-no'>"+("&gt;&gt;No."+q)+"</span></blockquote>"}});if(o.indexOf("</a>")<0){p=/(https?|ftp):\/\/[\-A-Za-z0-9+&@#\/%?=~_|!:,.;]*[\-A-Za-z0-9+&@#\/%=~_|]/g;o=o.replace(p,function(q){var r="",s=q.substr(q.lastIndexOf(".")+1);var t='<a href="'+q+'" target="_blank" class="external-link">'+q+"</a>";t="<div>"+t+"</div>";if(["mp3","aac","ogg","wav"].indexOf(s)>-1){r=t+'<audio src="'+q+'" preload="none" controls="true"></audio>'}else{if(["mp4","webm"].indexOf(s)>-1){r=t+'<video src="'+q+'" preload="none" controls="true"></video>'}else{r=t}}return r});p=/ac(\d{2,8})/g;o=o.replace(p,function(q){q=o.indexOf("/"+q)>-1?q:'<a href="http://www.acfun.tv/v/'+q+'" target="_blank" class="external-link">'+q+"</a>";return q})}p=/\[h\](.*?)\[\/h\]/g;o=o.replace(p,'<span class="h-hidden-text">$1</span>');j=="comment"&&o.replace(/\n/g,"<br>");var n=document.createElement("div");n.innerHTML=o;n.className="comment-content";return n},b=function(t){var s=document.createElement("div"),q=document.createElement("span"),o=document.createElement("span"),p=document.createElement("span");var r=t.id||t.threadid,n=t.userid||t.uid;o.className="uid"+(e?" po":"");o.innerHTML=parseInt(t.admin,10)&&n&&n.indexOf("<font")<0&&("<font color='red'>"+n+"</font>")||n||"";q.className="ttime";q.innerHTML=t.created&&j!="favor"?(parseTime(t.created)+" "):t.now?(parseTime(t.now)+" "):"";p.className="rid";p.setAttribute("data-thread-id",r);p.textContent=r?"No."+r:"";s.className="comment-header";s.appendChild(o);s.appendChild(q);s.appendChild(p);return s},h=function(){var n=document.createElement("div"),o="";o+=g.title&&g.title!="无标题"?("<p>标题："+g.title+"</p>"):"";o+=g.name&&g.name!="无名氏"?("<p>名称："+g.name+"</p>"):"";o+=g.email?("<p>Email："+g.email+"</p>"):"";o+=parseInt(g.sage,10)?("<p class='sage'>(本串已经被SAGE)</p>"):"";n.className="comment-info";n.innerHTML=o;return n},l=function(){var o=g.site||D("thread-section").getAttribute("data-site")||"hacfun",v=H[o].cdn,p=document.createElement("div"),s=document.createElement("img"),t=g.img?g.img.replace(/\/Th\//g,"/th/"):"",q=g.ext?g.ext.replace(".jpe",".jpeg"):"",u="t",n="",r="";src="";if(o!="hacfun"){u=o.charAt(0);n="/"+t+"_t"+q,r="/"+t+q}else{n="/thumb/"+t+q,r="/image/"+t+q}src=v+n;if(g.img&&(g.img.indexOf("http:")>-1||g.img.indexOf("https:")>-1||g.img.indexOf("file:")>-1)){src=g.img}if(j=="favor"){g.fileName=g.fileName?g.fileName:n.substr(n.lastIndexOf("/")+1)}if(g.fileName){if(j=="thread"||j=="local-thread"){src="favor/threads/"+u+(d||g.id)+"/images/"+g.fileName}else{if(j=="favor"||j=="comment"){src=j+"/images/"+g.fileName}}s.setAttribute("local-src",src);s.setAttribute("src",src)}s.setAttribute("src",src);n&&s.setAttribute("thumb-src",v+n);r&&s.setAttribute("full-size-src",v+r);s.onerror=function(){this.onerror=null;this.src=this.getAttribute("thumb-src")};p.className="comment-image";p.appendChild(s);return p},k=function(o){var p=document.createElement("article"),n="comment";p.setAttribute("data-tid",g.threadsId||g.threadid||g.tid||g.id);g.state&&p.setAttribute("data-state",g.state);g.replyPage&&p.setAttribute("data-reply-page",g.replyPage);g.site&&p.setAttribute("data-site",g.site);n+=o=="favor"?" favor-list":o=="comment"?" comment-list":"";p.className=n;var q=b(g);if(o=="comment"){if(g.state=="sent"){q.querySelector(".rid").textContent=g.forumName?"["+g.forumName+"]":""}else{q.querySelector(".rid").textContent=""}}else{q.querySelector(".rid").textContent=""}g.content=g.content||"";g.content=g.content.length>300?g.content.slice(0,300)+"...":g.content;p.appendChild(q);p.appendChild(h());(g.img||g.fileName)&&p.appendChild(l());p.appendChild(a(g.content));return p},f=function(){var n=document.createElement("article");n.id="t"+g.id;n.className="comment";n.setAttribute("data-uid",g.uid);n.appendChild(b(g));n.appendChild(h());(g.img||g.fileName)&&n.appendChild(l());n.appendChild(a(g.content));return n};var c="";switch(j){case"favor":c=k("favor");break;case"comment":c=k("comment");break;case"local-thread":c=f();break}return c}function Quote(c,e){c=c||[];var b="";var d=D("thread-section").getAttribute("data-site")||"hacfun";var a=H[d].cdn;return{"render":function(i){var k=(b&&unescape(b)==i.userid)?true:false,p=document.createElement("article"),m=document.createElement("p"),j=document.createElement("span"),n=document.createElement("span");j.className="ttime";j.innerHTML=parseTime(i.now)+" ";n.className="uid"+(k?" po":"");n.innerHTML=parseInt(i.admin,10)&&i.userid&&i.userid.indexOf("<font")<0&&('<font color="red">'+i.userid+"</font>")||i.userid||"";m.className="quote-header";m.appendChild(n);m.appendChild(j);p.className="quote-area";p.appendChild(m);if(i.img){var g=(d=="hacfun"?"/thumb/":"/")+i.img.replace(/\/Th\//g,"/th/")+i.ext.replace(".jpe",".jpeg");var f=a+g;if(i.img.indexOf("http:")>-1||i.img.indexOf("https:")>-1||i.img.indexOf("file:")>-1){f=i.img}var h=document.createElement("div");h.className="quote-img";var l=document.createElement("button");l.className="btn-show-image";l.textContent="显示图片";l.setAttribute("type","button");l.setAttribute("thumb-src",f);var r=d=="hacfun"?"t":d.charAt(0);i.fileName&&l.setAttribute("local-src","favor/threads/"+r+e+"/images/"+i.fileName);h.appendChild(l);p.appendChild(h)}var o=document.createElement("div"),q=i.content;q=q.replace(/#789922/g,"");q=q.replace(/\[h\](.*?)\[\/h\]/g,'<span class="h-hidden-text">$1</span>');o.className="comment-content";o.innerHTML=q;p.appendChild(o);return p},"renderAll":function(){var h=this,g={};[].slice.call(c).forEach(function(i){var k=i.getAttribute("data-thread-id"),j=queryCachedThread(e,k);b=i.getAttribute("data-po-uid");if(j){g[k]=g[k]&&g[k].cloneNode(true)||h.render(j);i.appendChild(g[k])}});for(var f in g){delete g[f]}g=null}}}function Page(m,c){var p=document.createDocumentFragment(),e=c.data,h=c.currentPage,f=c.totalPage,k="Page "+h+"/"+f+"<span class='arrow'></span>";var o=document.createElement("p");o.className="pagination";o.innerHTML=k;p.appendChild(o);if(m=="thread"||m=="local-thread"){var b=e.replys||[],n=e.userid;if(e.id){var a=new Comment(e,m,n,e.id);p.appendChild(a)}for(var d=0,j=b.length;d<j;d++){var g=new Comment(b[d],m,n,e.id);p.appendChild(g)}}else{for(var d=0,j=e.length;d<j;d++){var g=new Comment(e[d],m,"",e[d].id);p.appendChild(g)}}var l=document.createElement("div");l.setAttribute("data-page-no",h);l.appendChild(p);return l}function navigateToPage(a,c){switch(c){case"thread":case"local-thread":default:var b=D("thread-section").getAttribute("data-thread-id");loadThread(b,a);break;case"favor":loadOPList("favor",a);break;case"comment":loadOPList("comment",a);break}}function addToCache(d,c,b){var a=Caches;a[d]=a[d]||{};b.forum=null;a[d][c]=b}function queryCachedThread(c,e){var m="",h=Caches||{};var l=h[c];if(!l){return m}e=e||c;for(var j in l){var k=l[j];if(!k){continue}var a=k.id||"";if(a&&a==e){m=k;break}var d=k.replys||[];for(var f=0,g=d.length;f<g;f++){var b=d[f];if(b.id==e){m=b;break}}if(m){break}}return m}function insert(a,b,d,c){if(a==1){b.insertBefore(d,c)}else{if(a==2){b.appendChild(d)}else{empty(b);b.appendChild(d)}}}function parseTime(f){if(!f){return""}f=isNaN(f)?f.replace(/\((.*?)\)/," ").replace(/-/g,"/"):f;var m,d=new Date(),c=new Date(f),k=c.getFullYear(),j=c.getMonth(),h=c.getHours(),g=c.getMinutes(),e=c.getDate();var l=(j+1)+"/"+e;var n=(h<1?"0":"")+h+":"+(g<10?"0":"")+g;var i=d.getFullYear();if(k==i){var b=c.getSeconds();var a=(b<10?"0":"")+b;if(d.getMonth()==j&&d.getDate()==e){m=n+":"+a}else{m=l+" "+n+":"+a}}else{m=(k+"").slice(2,4)+"/"+l+" "+n}if(d-c>180*24*60*60*1000){m="<span class='long-long-ago'>"+m+"</span>"}return m}function findParent(e,a){var d=a.charAt(0),c=d==="."?"class":(d==="["?"attribute":"tag"),b=e.parentNode;while(b){if(b.nodeName.toLowerCase()=="body"){return null}if(c=="class"){if(b.classList.contains(a.substring(1))){break}}else{if(c=="tag"){if(b.nodeName.toLowerCase()==a){break}}else{if(c=="attribute"){a=a.replace(/(\[)|(\])/g,"");if(b.getAttribute(a)!==null){break}}}}b=b.parentNode}return b}function backwardCompatible(b){if(!b.threads){return b}var c=function(g){var e={};e.id=g.id;e.userid=g.uid;e.name=g.name;e.title=g.title;e.email=g.email;e.content=g.content;e.fileName=g.fileName;e.replyCount=g.replyCount;e.now=g.createdAt;if("sage" in g){e.sage=g.sage&&g.sage!="0"?"1":"0"}if(g.image){var f=g.image,d=f.lastIndexOf(".");e.img=f.slice(0,d);e.ext=f.slice(d)}return e};var a={};a=c(b.threads);a.replys=[];b.replys.forEach(function(d){a.replys.push(c(d))});return a}function dispatch(d,a,b){var c=document.createEvent("CustomEvent");if(c&&c.initCustomEvent){c.initCustomEvent(a,true,true,b)}else{c=document.createEvent("Event");c.initEvent(a,true,true);c.detail=b}return d.dispatchEvent(c)}function showMsg(a,c,d){if(!a){return}var b=a.querySelector(".msg");b&&b.parentNode&&b.parentNode.removeChild(b);b=document.createElement("button");b.className="msg";b.innerHTML=c||"加载大失败";b.onclick=function(e){e.preventDefault();e.stopPropagation();this.onclick=null;this.parentNode.removeChild(this);d&&d(e)};return b}function freeImageMemory(a){[].slice.call(a).forEach(function(b){b.setAttribute("src","")})}function empty(a){while(a.firstChild){a.removeChild(a.firstChild)}}function _set_data_(a){dispatch(document,"dataLoaded",{data:a})};
</script>
</html>